<?php $this->load->view('templates/header');?>

<body style="padding-top: 0px;">
<nav class="navbar navbar-default" style="background-color: #f9f9f9; border-bottom:1px solid #d5d5d5">
  <div class="container-fluid">
    <!-- Brand and toggle get grouped for better mobile display -->
    <div class="navbar-header">
      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
    </div>

    <!-- Collect the nav links, forms, and other content for toggling -->
    <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">

      <ul class="nav navbar-nav navbar-right">
        <li class="dropdown">
          <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Menu <span class="caret"></span></a>
          <ul class="dropdown-menu">
            <li><?php echo anchor('auth/manage_photos','參賽作品')?></li>
            <li class="current"><?php echo anchor('auth/voter_info','投票者資料')?></li>
            <li><?php echo anchor('auth/logout','登出')?></li>
          </ul>
        </li>
      </ul>
    </div><!-- /.navbar-collapse -->
  </div><!-- /.container-fluid -->
</nav>


<h1 style="text-align:center">投票者資料</h1>


<div id="infoMessage"></div>

<table class="table table-striped photo-table">
	<tr>
		<th>Facebook ID</th>
		<th>Facebook name</th>
        <th>Facebook email</th>
        <th>投票結果 (對應參賽作品的相片編號)</th>
	</tr>
	<?php foreach ($voterInfo as $info):?>
		<tr>
			<td><?php echo $info['fb_id'];?></td>
			<td><?php echo $info['fb_name'];?></td>
            <td><?php echo $info['fb_email'];?></td>
            <td><?php echo $info['vote_img'];?></td>
		</tr>
	<?php endforeach;?>
</table>

<?php echo anchor('auth/export_csv_voter','Export to CSV', 'class="btn btn-default btn-export-voter"')?>

<?php $this->load->view('templates/footer');?>

</body>